package com.macrounion.atv.service.service;

import java.util.List;
import java.util.Map;

import com.github.pagehelper.Page;
import com.macrounion.atv.service.entity.Net;
import com.macrounion.atv.service.entity.Protocol;
import com.macrounion.atv.service.entity.ProtocolC;
import com.macrounion.atv.service.entity.ext.ProtocolExt;
import com.macrounion.atv.service.entity.ext.ProtocolOutExt;
import com.macrounion.base.service.service.BaseService;

public interface ProtocolService extends BaseService<Protocol> {

	/**
	 * 协议点表Map
	 * @param pids
	 * @return
	 */
	Map<String, List<ProtocolC>> getProtocolMap(List<String> pids);

	/**
	 * 网关列表
	 * @return
	 */
	List<Net> getNets();

	/**
	 * 协议列表
	 * @param type
	 * @return
	 */
	List<Protocol> getProtocolByType(String type);

	Page<ProtocolExt> requestPageExt(Protocol p);

	/**
	 * 获取协议输出中转数据
	 * @param protocolId 协议Id
	 * @return
	 */
	List<ProtocolOutExt> getProtocolOut(String protocolId);
	List<Protocol>getProtocolByNetId(String netId);

	int saveProtocols(List<Protocol> protocols);

	/**
	 * 在外部导入协议时检索是否重名
	 * @param protocolName
	 * @return
	 */
	int getCountByName(String protocolName);

	/**
	 * 检查是否被引用
	 * @param protocolId
	 * @return
	 */
	boolean checkIsUsed(String protocolId);
}